 /**
 * 逻辑、功能相关描述:
 *
 * @author 许心炜 编写日期：2008-10-7
 */
package com.ce.pms.common.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.sitechasia.webx.core.model.IDomainObject;

@Entity
@Table(name = "HM_EMPLOYEE")
public class HmEmployeeDomain implements IDomainObject {

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue
	@Column(name = "EMPLOYEE_ID")
	private Long employeeId;

	/**
	 * 部门
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DEPT_ID")
	private HmDeptDomain deptDO;

	/**
	 * 雇员的名字
	 */
	@Column(name = "EMPLOYEE_NAME")
	private String employeeName;

	/**
	 * 员工
	 */
	@OneToOne(mappedBy = "employeeDO")
	private SecUser sesUser;

	/**
	 * 性别
	 */
	@Column(name = "SEX")
	private Long sex;

	/**
	 * 代码类型
	 */
	@Column(name = "ID_TYPE_ID")
	private Long idTypeId;

	@Column(name="JOB",length=50)
	private String job;

	/**
	 * 员工代码
	 */
	@Column(name = "ID_NO")
	private String idNo;

	/**
	 * mini constructor
	 *
	 * @param employeeId
	 *            雇员ID
	 * @param deptDO
	 *            部门
	 * @param employeeName
	 *            雇员的名字
	 * @param sex
	 *            性别
	 * @param idTypeId
	 *            代码类型
	 * @param idNo
	 *            员工代码
	 */
	public HmEmployeeDomain(Long employeeId, HmDeptDomain deptDO,
			String employeeName, Long sex, Long idTypeId, String idNo) {
		super();
		this.employeeId = employeeId;
		this.deptDO = deptDO;
		this.employeeName = employeeName;
		this.sex = sex;
		this.idTypeId = idTypeId;
		this.idNo = idNo;
	}

	public HmEmployeeDomain() {
		super();
		// TODO Auto-generated constructor stub
	}

	public HmEmployeeDomain(Long employeeId){
		this.employeeId = employeeId;
	}

	public HmDeptDomain getDeptDO() {
		return deptDO;
	}

	public void setDeptDO(HmDeptDomain deptDO) {
		this.deptDO = deptDO;
	}

	public String getEmployeeName() {
		return employeeName;
	}

	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}

	public String getIdNo() {
		return idNo;
	}

	public void setIdNo(String idNo) {
		this.idNo = idNo;
	}

	public Long getIdTypeId() {
		return idTypeId;
	}

	public void setIdTypeId(Long idTypeId) {
		this.idTypeId = idTypeId;
	}

	public Long getSex() {
		return sex;
	}

	public void setSex(Long sex) {
		this.sex = sex;
	}

	public Long getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(Long employeeId) {
		this.employeeId = employeeId;
	}

	public SecUser getSesUser() {
		return sesUser;
	}

	public void setSesUser(SecUser sesUser) {
		this.sesUser = sesUser;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}



}
